package net.simplifiedcoding.ui.auth

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import android.widget.Toast
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.runBlocking
import net.simplifiedcoding.R
import net.simplifiedcoding.data.UserPreferences
import javax.inject.Inject

@AndroidEntryPoint
class AuthActivity : AppCompatActivity() {


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_auth)
        val isNetworkConnect = NetworkMonitor(this@AuthActivity).isNetworkAvailable(this@AuthActivity)
        Log.i("Hengliang","$isNetworkConnect")
        NetConnectManager.init(this)

        Log.e("qingshan", "${NetConnectManager.isConnected()}")
        NetConnectManager.addNetTypeChangeListener {
            Log.e("qingshan", "网络类型[监听]= $it")
        }
        NetConnectManager.addNetStatusChangeListener {
            Log.e("qingshan", "网络是否已连接[监听]= $it")
        }
    }
}